<div id="sidebar">	
<ul class="sidelist">
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
	
				<li><h2>Ricerca</h2>	
				<form action="<?php bloginfo('home'); ?>/" method="get" id="searchform">
					<p>
					<input id="stringa" type="text" name="s" class="textbox" />
  					<input name="search" class="button" value="Search" type="submit" />
					</p>			
				</form>
				</li>
			
		<?php if (is_home()) { ?>
		<li>
		<h2>In Seconda Pagina</h2>
		<ul>
		<?php $temp_query2 = $wp_query; ?>
		<?php query_posts('paged=2'); ?>
		<?php if (have_posts()) { ?>
		<?php while (have_posts()) : the_post(); ?>
			<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></li>
			<?php endwhile; ?>
		<?php } else { ?> 
		<li>Nessun articolo...</li>
		<?php } ?>
		<?php $wp_query = $temp_query2; ?>
		</ul>
		</li>
		<?php } ?>
			
			<li>	
			<h2 class="categories">Categorie</h2>
			<ul class="sidemenu">
				<?php wp_list_cats(); ?>
			</ul>
			</li>
			
			<li>
			<h2 class="archives">Archivio</h2>
			<ul class="sidemenu">
				<?php wp_get_archives('type=monthly'); ?>
			</ul>
			</li>
			
			<li>
			<h2 class="blogroll">BlogRoll</h2>
			<ul class="sidemenu">
				<?php get_links('-1', '<li>', '</li>', '<br />', 0, 'name', 0, 0, -1, 0); ?> 
			</ul>
			</li>
			
			<?php endif; ?>			
</ul>								
		</div>